<!DOCTYPE html>
<script src="../../../resources/js-test.js"></script>
<style>
.inner1 [attr] { color: red; }
.inner2 .nomatch { color: red; }
</style>
<div id="outer">
    <div id="inner1">
        <div></div>
    </div>
    <div id="inner2">
        <div attr></div>
    </div>
</div>
<script>
description("Test invalidation set scope for attribute features.");

document.body.offsetLeft; // force style recalc.

document.getElementById("inner1").className = "inner1";
document.getElementById("inner2").className = "inner2";
if (window.internals)
    shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "0");
</script>
